<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>父组件和子组件的概念</title>
</head>
<body>
<div id="app">
    <parent-component></parent-component>
</div>

<script type="module">
  import {createApp, defineComponent} from "../../../../js/vue.esm-browser.js";

  let childComponent = defineComponent({
    template:"<h2>我是子组件</h2>"
  });


  let parentComponent = defineComponent({
    template:
        `
        <h1>我是父组件</h1>
        <child-component></child-component>
        `,
    components:{
      childComponent,
    }
  });

  let app = createApp({
    setup(){
      return {}
    },

      components: {
        parentComponent,
      }
  })

  app.mount("#app")
</script>
</body>
</html>